package com.example.gustavo.hello.receiver;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.util.Log;

public class SmsSendReceiver extends BroadcastReceiver {
    private static final String TAG = "Receiver";

    public SmsSendReceiver() {
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        if(intent != null){

            switch (getResultCode()){

                //发送成功
                case Activity.RESULT_OK:

                    break;

                default:


                    break;

            }

            Bundle extras = intent.getExtras();
            for (String s : extras.keySet()) {

                Log.w(TAG,"key= " + s+" value= "+extras.get(s));
            }
            Log.w(TAG, "Sms send" + intent.toString());
        }
    }
}
